package com.hackerrank.challenges.hackerranktweets;

import java.util.Scanner;

public class Solution {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int N = in.nextInt(), c = 0;
		in.nextLine();
		for(int n = 0; n < N; n++)
			if(in.nextLine().toLowerCase().contains("hackerrank"))
				c++;
		System.out.println(c);
	}
}
